home *** CD-ROM | disk | FTP | other *** search
- /*==========================================================================
-
- SlimApp.h
-
- This file defines functions to determine if the running application
- is a fat application and if so, to strip the unneeded code from the
- application.
-
- Add the file "SlimApp.c" to your project and include this header file
- in any source files that call the stripping routines.
-
- Copyright 1995 by Blake Ward.
-
- Permission is granted for unrestricted use, provided the author
- is credited.
-
- ==========================================================================*/
-
- #ifndef __SLIMAPP__
- #define __SLIMAPP__
-
-
- // We need this so that these routines are correctly defined when called from
- // .cp files.
- #ifdef __cplusplus
- extern "C" {
- #endif
-
-
-
- /*==========================================================================
- Stuctures and Contants
- ==========================================================================*/
-
- #define k68KApplication 1
- #define kPowerPCApplication 2
- #define kFatBinaryApplication 3
-
-
-
-
- /*==========================================================================
- IDs For Resources
- ==========================================================================*/
-
- // These ID's are for the stub that we insert when stripping away 68K code.
- // These resources are created with a separate project and then copied
- // into SlimApp.rsrc with their types and ID's changed to the following values.
- #define kStubCODEType 'CoDe'
- #define kStubDATAType 'DaTa'
- #define kStubCodeID 9998 // & 9999
- #define kStubDataID 9999
-
- // Error and warning dialogs
- #define kCodeStripFailedErrorDialog 9999
-
- // STR# Resource
- #define kSlimAppStrings 9999
-
- // Indexed strings in kSlimAppStrings
- #define kFatBinaryFileName 1
- #define kFatBinaryLabel 2
- #define kPowerPCLabel 3
- #define k68KLabel 4
- #define kStripPowerPCButtonLabel 5
- #define kStrip68KButtonLabel 6
- #define kPowerMacOnlyWarning 7
- #define k68KOnlyWarning 8
- #define kFatBinaryVersionName 9
- #define k68KVersionName 10
- #define kPowerMacVersionName 11
-
-
-
- /*==========================================================================
- Prototypes Of Functions Shared With Other Source Files
- ==========================================================================*/
-
- OSErr Has68KPowerPCCode(void);
-
- Boolean SafeToStrip(void);
-
- OSErr StripFatApplication(void);
-
- short int GetApplicationResourceFork(void);
-
- void GetShortVersion(StringPtr versMsg);
-
- void GetLongVersion(StringPtr versMsg);
-
- OSErr SetLongVersion(StringPtr versionStr);
-
-
- #ifdef __cplusplus
- }
- #endif
-
-
- #endif